void MCMOVE(En, Vir, Attempt, Nacc, Dr, Iseed)
{
	double enn, eno, En, RANF, xn, yn, zn, viro, virn, Vir, Dr;
	int o, Attempt, Nacc, jb, Iseed;
	Attempt = Attempt + 1;
	jb = 1;
	//select a particle at random
	o = INT(NPART*RANF(Iseed)) + 1;
	//calculate energy old configuration
	ENERI(X(o), Y(o), Z(o), o, jb, eno, viro);
	//give particle a random displacement
	xn = X(o) + (RANF(Iseed)-0.5)*Dr;
	yn = Y(o) + (RANF(Iseed)-0.5)*Dr;
	zn = Z(o) + (RANF(Iseed)-0.5)*Dr;
	//calculate energy new configuration:
	ENERI(xn, yn, zn, o, jb, enn, virn);
	//acceptance test
	if ((RANF(ISEED)) < EXP(-BETA*(enn-eno)))
	{
		//accept
		Nacc = Nacc + 1;
		En = En + (enn - eno);
		Vir = Vir + (virn-viro);
		//put particle in simulation box
		if (xn < 0)
			xn = xn + BOX;
		if (xn > BOX)
			xn = xn - BOX;
		if (yn < 0)
			yn = yn + BOX;
		if (yn > BOX)
			yn = yn - BOX;
		if (zn < 0)
			zn = zn + BOX;
		if (zn > BOX)
			zn = zn - BOX;
		X(o) = xn;
		Y(o) = yn;
		Z(o) = zn;
	}
}

	}
}
